package com.mk.service;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.mk.entity.User;
import com.mk.mapper.UserMapper;

@Service
public class UserService
{	
	@Autowired
	UserMapper userMapper;

	/**
	 * 查询
	 * @param name
	 * @return
	 */
	public User findUserByName(String name) {
		return userMapper.selectByName(name);
	}
	
	/**
	 * 根据 id查询
	 * @param id
	 * @return
	 */
	public User findUserById(Integer id) {
		return userMapper.selectById(id);
	}
	
	
}
